package com.bey.keepgoing.repository.dao.sql.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.bey.keepgoing.model.User;

public class AccountRowMapper implements RowMapper<User> {
	
	public User mapRow(ResultSet rs, int rowNum) throws SQLException {
		User user = new User();
		user.setLoginName(rs.getString("loginName"));
		user.setName(rs.getString("name"));
		user.setPassword(rs.getString("password"));
		user.setSalt(rs.getString("salt"));
		user.setRoles(rs.getString("roles"));
		user.setRegisterDate(rs.getDate("registerDate"));
		return user;
	}

}
